<!--
 * @Author: 260156 260156@gree.com.cn
 * @Date: 2022-07-25 13:48:51
 * @LastEditors: 260156 260156@gree.com.cn
 * @LastEditTime: 2022-10-27 14:34:48
 * @FilePath: \gree-zst-web\src\App.vue
 * @Description: 
 * 
 * Copyright (c) 2022 by 260156 260156@gree.com.cn, All Rights Reserved. 
-->
<script setup lang="ts">
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
import zhCn from "element-plus/lib/locale/lang/zh-cn";
const isRouterActive = ref(true);
// provide('reload',()=>{
//   isRouterActive.value=false
//   nextTick(()=>{
//     isRouterActive.value=true
//   })
// })
const locale = zhCn;
</script>

<template>
  <el-config-provider :locale="locale">
    <router-view v-slot="{ Component }" v-if="isRouterActive">
      <template v-if="Component">
        <my-transition name="tab" appear>
          <suspense>
            <component :is="Component" />
            <template #fallback>正在加载...</template>
          </suspense>
        </my-transition>
      </template>
    </router-view>
  </el-config-provider>
</template>

<style>
body {
  padding: 0;
  margin: 0;
  background-color: #f5f5f5;
}
#app {
  font-family: var(--el-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
